package com.qiezikaka.kaka.view;

import jp.co.cyberagent.android.gpuimage.GPUImageFilter;

public class GPUImageMirrorFilter extends GPUImageFilter {
    public static final String MIRROR_FRAGMENT_SHADER = "" +
            "   varying highp vec2 textureCoordinate;\n" +
            "    uniform sampler2D inputImageTexture;\n" +
            "\n" +
            "    void main() {\n" +
            "        highp vec2 flippedCoords = vec2(1.0 - textureCoordinate.x, textureCoordinate.y);\n" +
            "        gl_FragColor = texture2D(inputImageTexture, flippedCoords);\n" +
            "    }";

    public GPUImageMirrorFilter() {
        super(NO_FILTER_VERTEX_SHADER, MIRROR_FRAGMENT_SHADER);
    }

    @Override
    public void onInit() {
        super.onInit();
    }

    @Override
    public void onOutputSizeChanged(final int width, final int height) {
        super.onOutputSizeChanged(width, height);
    }
}
